layui.define(['http', 'apiConsultation'], function (exports) {
    var request = layui.http.service,
        api = layui.apiConsultation;

    var consultationServices = {

        /**
         * @author: ares
         * @date: 2021/3/26 13:40
         * @description: 会诊病历分页查询
         * @param {number}page
         * @param {number}page_size
         * @param {object}params
         * @returns {Promise.<TResult>}
         */
        getConsultationPageListService: function (page,page_size, params) {
            var _params = {
                page: page,
                page_size: page_size
            };
            $.extend(_params, params);
            return request(api.getConsultationPageList, {params: _params})
        },

        /**
         * @author: ares
         * @date: 2021/3/16 20:52
         * @description: 新建会诊
         * @param {object}data
         * @returns {Promise.<TResult>}
         */
        createConsultationService: function (data) {
            return request(api.createConsultation, {method: 'post', data: data})
        },

        /**
         * @author: ares
         * @date: 2021/3/16 21:07
         * @description: 获取会诊科室
         * @returns {Promise.<TResult>}
         */
        getConsultationDevisionService: function () {
            return request(api.getConsultationDevision)
        },

        /**
         * @author: ares
         * @date: 2021/3/17 9:51
         * @description: 获取会诊详情
         * @param {string}id  会诊id
         * @returns {Promise.<TResult>}
         */
        getConsultationDetailService: function (id) {
            var params = {id: id};
            return request(api.getConsultationDetail, {params: params})
        },
}

    exports("consultationServices", consultationServices);
})